[XEND] Remove hard tabs from destroyDevice()
authoratse@norwich.uk.xensource.com <atse@norwich.uk.xensource.com>
Fri, 22 Sep 2006 14:56:19 +0000 (15:56 +0100)
committeratse@norwich.uk.xensource.com <atse@norwich.uk.xensource.com>
Fri, 22 Sep 2006 14:56:19 +0000 (15:56 +0100)
Reported by Hollis Blanchard.

Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index f47d9303490a3506fdd84aeef0343753f549304a..3478ef6c945b183d83e37535aeb0461a19c881c3 100644 (file)
@@ -1098,15 +1098,16 @@ class XendDomainInfo:
     ## public:
 
     def destroyDevice(self, deviceClass, devid):
-       if type(devid) is str:
-           devicePath = '%s/device/%s' % (self.dompath, deviceClass)
-           for entry in xstransact.List(devicePath):
-               backend = xstransact.Read('%s/%s' % (devicePath, entry), "backend")
-               devName = xstransact.Read(backend, "dev")
-               if devName == devid:
-                   # We found the integer matching our devid, use it instead
-                   devid = entry
-                   break
+        if type(devid) is str:
+            devicePath = '%s/device/%s' % (self.dompath, deviceClass)
+            for entry in xstransact.List(devicePath):
+                backend = xstransact.Read('%s/%s' % (devicePath, entry),
+                                          "backend")
+                devName = xstransact.Read(backend, "dev")
+                if devName == devid:
+                    # We found the integer matching our devid, use it instead
+                    devid = entry
+                    break
         return self.getDeviceController(deviceClass).destroyDevice(devid)